<template>
  <div class="app-container home">
    <el-card shadow="hover">
      <el-row>
        <el-col :span="10" style="display: flex"
          ><div>
            <el-avatar shape="square" :size="50" src="https://cube.elemecdn.com/9/c2/f0ee8a3c7c9638a54940382568c9dpng.png"></el-avatar>
          </div>
          <div style="margin: 5px">
            <div>15751431357</div>
            <div><span>到期时间：</span><span>2024-11-18 23:00</span></div>
          </div>
        </el-col>
        <el-col :span="8"
          ><div><span>积分数量：</span><span>12345</span></div></el-col
        >
        <el-col :span="8"><div></div></el-col>
      </el-row>
    </el-card>
    <el-card shadow="hover">
      <el-table v-loading="loading" :data="dataList">
        <el-table-column label="类型" align="center" prop="productName" />
        <el-table-column label="积分变动数量" align="center" prop="productName" />
        <el-table-column label="时间" align="center" prop="productName" />
      </el-table>

      <pagination v-show="total > 0" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" :total="total" @pagination="getList" />
    </el-card>
  </div>
</template>
<script lang="ts" setup>
// import { list, add, edit, digital, delDemo } from '@/api/system/work/index';
// import { DemoVO, DemoForm, DemoQuery } from '@/api/system/work/types';

const { proxy } = getCurrentInstance() as ComponentInternalInstance;

import { getToken } from '@/utils/auth';
import { ref } from 'vue';

const token = getToken();
const Authorization = `Bearer ${token}`;
const clientid = import.meta.env.VITE_APP_CLIENT_ID;
const headers = ref({ 'Authorization': Authorization, 'clientid': clientid });

const initFormData: DemoForm = {
  id: undefined
};

const data = {
  form: { ...initFormData },
  queryParams: {
    pageNum: 1,
    pageSize: 10
  }
};

const dataList = ref<DemoVO[]>([]);
const total = ref(0);
const loading = ref(true);
const videoInstance = shallowRef(); //提高性能

let form = ref({});
const dialog = {
  title: ''
};
const { queryParams, rules } = toRefs(data);

/** 查询列表 */
const getList = async () => {
  //   loading.value = true;
  //   const res = await list(queryParams.value);
  //   dataList.value = res.rows;
  //   total.value = res.total;
  loading.value = false;
};

onMounted(() => {
  getList();
});
</script>

<style scoped lang="scss">
.home {
  height: 100%;

  blockquote {
    padding: 10px 20px;
    margin: 0 0 20px;
    font-size: 17.5px;
    border-left: 5px solid #eee;
  }
}
</style>
